package com.example.demo.model;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;
@Data
@ApiModel("用户信息")//@ApiModel: 作⽤在响应的类上，对返回响应数据的说明

public class User {
    //@ApiModelProerty:作⽤在类的属性上，对属性的说明
    @ApiModelProperty("用户ID")
    private Long id;
    @ApiModelProperty("用户姓名")
    private String username;
    @JsonIgnore//不参与JSON的序列化
    private String password;
    @ApiModelProperty("用户昵称")
    private String nickname;
    @ApiModelProperty("用户电话")
    private String phoneNum;
    @ApiModelProperty("用户邮箱")
    private String email;
    @ApiModelProperty("性别")
    private Byte gender;
    @JsonIgnore//不参与JSON的序列化
    private String salt;
    @ApiModelProperty("用户头像地址")
    @JsonInclude(JsonInclude.Include.ALWAYS)
    private String avatarUrl;
    @ApiModelProperty("文章数量")
    private Integer articleCount;
    @ApiModelProperty("是否是管理员")
    private Byte isAdmin;
    @ApiModelProperty("个人简介")
    private String remark;
    @ApiModelProperty("用户状态")

    private Byte state;
    @JsonIgnore//不参与JSON的序列化
    private Byte deleteState;
    @ApiModelProperty("注册时间")
    private Date createTime;

    private Date updateTime;
}